runOnStartup(async runtime => {
    runtime.addEventListener("tick", () => tick())
    runtime.getLayout("MainLevel").addEventListener("afterlayoutstart", () => init())
});
function tick() {
    if(runtime.layout.name!="MainLevel") return;
    playerFace.playerFaceCamera()
}
function init() {
    playerFace.init()
}
export default class playerFace {
    static init() {
        this.player3Dshape = runtime.objects.PlayerBillboard.getFirstInstance()
        this.shapeUID = this.player3Dshape.uid
    }
    static playerFaceCamera() {
        let Camera3DX = runtime.objects.DCamera.getCameraPosition()[0]
        let Camera3DY = runtime.objects.DCamera.getCameraPosition()[1]
        runtime.callFunction("angelToward", this.shapeUID, Camera3DX, Camera3DY)
    }
}
